{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "f0032298",
   "metadata": {},
   "source": [
    "# Анализ заказов такси с помощью PySpark"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "be0a0ce6",
   "metadata": {},
   "source": [
    "Анализ данных о заказах такси у терминала №5 Нью-Йоркского аэропорта с помощью библиотеки PySpark и данных, загруженных из файла CSV в базу данных PostgreSQL."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4e387b9c",
   "metadata": {
    "toc": true
   },
   "source": [
    "<h1>Содержание<span class=\"tocSkip\"></span></h1>\n",
    "<div class=\"toc\"><ul class=\"toc-item\"><li><span><a href=\"#Подготовка-тетради\" data-toc-modified-id=\"Подготовка-тетради-1\"><span class=\"toc-item-num\">1&nbsp;&nbsp;</span>Подготовка тетради</a></span></li><li><span><a href=\"#Инициализация-БД-и-загрузка-данных-из-файла-CSV\" data-toc-modified-id=\"Инициализация-БД-и-загрузка-данных-из-файла-CSV-2\"><span class=\"toc-item-num\">2&nbsp;&nbsp;</span>Инициализация БД и загрузка данных из файла CSV</a></span></li><li><span><a href=\"#Анализ-данных\" data-toc-modified-id=\"Анализ-данных-3\"><span class=\"toc-item-num\">3&nbsp;&nbsp;</span>Анализ данных</a></span><ul class=\"toc-item\"><li><span><a href=\"#Первичный-анализ\" data-toc-modified-id=\"Первичный-анализ-3.1\"><span class=\"toc-item-num\">3.1&nbsp;&nbsp;</span>Первичный анализ</a></span></li><li><span><a href=\"#Обработка-пропусков\" data-toc-modified-id=\"Обработка-пропусков-3.2\"><span class=\"toc-item-num\">3.2&nbsp;&nbsp;</span>Обработка пропусков</a></span></li><li><span><a href=\"#Данные-в-различных-разрезах\" data-toc-modified-id=\"Данные-в-различных-разрезах-3.3\"><span class=\"toc-item-num\">3.3&nbsp;&nbsp;</span>Данные в различных разрезах</a></span></li></ul></li></ul></div>"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e42146a3",
   "metadata": {},
   "source": [
    "## Подготовка тетради"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "0542df54",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Загрузка библиотек\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "from pyspark.sql import SparkSession\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "157da98f",
   "metadata": {},
   "source": [
    "## Инициализация БД и загрузка данных из файла CSV"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "f9a47e69",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Инициализация объекта БД\n",
    "APP_NAME = \"DataFrames\"\n",
    "SPARK_URL = \"local[*]\"\n",
    "\n",
    "spark = SparkSession.builder.appName(APP_NAME) \\\n",
    "        .config('spark.ui.showConsoleProgress', 'false') \\\n",
    "        .getOrCreate()\n",
    "\n",
    "# Загрузка данных из файла в БД\n",
    "taxi = spark.read.load('/datasets/pickups_terminal_5.csv', \n",
    "                       format='csv', header='true', inferSchema='true')\n",
    "\n",
    "# Создание временной таблицы\n",
    "taxi.registerTempTable(\"taxi\")\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "78788ea1",
   "metadata": {},
   "source": [
    "## Анализ данных"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4573abe8",
   "metadata": {},
   "source": [
    "### Первичный анализ"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "fc4caa43",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Количество объектов в датафрейме: 128974\n",
      "+----------+----+------+-------+\n",
      "|      date|hour|minute|pickups|\n",
      "+----------+----+------+-------+\n",
      "|2009-01-01|   0|     0|   24.0|\n",
      "|2009-01-01|   0|    30|   35.0|\n",
      "|2009-01-01|   1|     0|   25.0|\n",
      "|2009-01-01|   1|    30|   25.0|\n",
      "|2009-01-01|   2|     0|   16.0|\n",
      "+----------+----+------+-------+\n",
      "only showing top 5 rows\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# Анализ данных датафрейма, \n",
    "# полученного из файла CSV\n",
    "\n",
    "# Вывод количества значений в таблице\n",
    "print(\"Количество объектов в датафрейме:\", taxi.count()) \n",
    "\n",
    "# Вывод первых пяти значений на экран\n",
    "taxi.show(n=5) \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "ea67140b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "+----------+----+------+\n",
      "|      date|hour|minute|\n",
      "+----------+----+------+\n",
      "|2009-01-01|   0|     0|\n",
      "|2009-01-01|   0|    30|\n",
      "|2009-01-01|   1|     0|\n",
      "|2009-01-01|   1|    30|\n",
      "|2009-01-01|   2|     0|\n",
      "+----------+----+------+\n",
      "only showing top 5 rows\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# Вывод трех не целевых столбцов \n",
    "# первых пяти строк на экран\n",
    "taxi['date', 'hour', 'minute'].show(5)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "02d76ca6",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "+-------+----------+------------------+------------------+------------------+\n",
      "|summary|      date|              hour|            minute|           pickups|\n",
      "+-------+----------+------------------+------------------+------------------+\n",
      "|  count|    128974|            128974|            128974|            128969|\n",
      "|   mean|      null|11.566509529052366|15.004419495402175|29.009451883786028|\n",
      "| stddev|      null| 6.908556452594711|15.000057500526209|  22.4493784836831|\n",
      "|    min|2009-01-01|                 0|                 0|               1.0|\n",
      "|    max|2016-06-30|                23|                30|             310.0|\n",
      "+-------+----------+------------------+------------------+------------------+\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# Анализ значений датафрейма \n",
    "# методом describe\n",
    "taxi.describe().show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "00c91111",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "+-------+----------+------------------+------------------+------------------+\n",
      "|summary|      date|              hour|            minute|           pickups|\n",
      "+-------+----------+------------------+------------------+------------------+\n",
      "|  count|    128974|            128974|            128974|            128969|\n",
      "|   mean|      null|11.566509529052366|15.004419495402175|29.009451883786028|\n",
      "| stddev|      null| 6.908556452594711|15.000057500526209|  22.4493784836831|\n",
      "|    min|2009-01-01|                 0|                 0|               1.0|\n",
      "|    25%|      null|                 6|                 0|              11.0|\n",
      "|    50%|      null|                12|                30|              27.0|\n",
      "|    75%|      null|                18|                30|              40.0|\n",
      "|    max|2016-06-30|                23|                30|             310.0|\n",
      "+-------+----------+------------------+------------------+------------------+\n",
      "\n",
      "None\n"
     ]
    }
   ],
   "source": [
    "# Анализ значений датафрейма \n",
    "# методом summary\n",
    "print(taxi.summary().show())\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "83ce9a9e",
   "metadata": {},
   "source": [
    "### Обработка пропусков"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "2ac85777",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "+-------+----------+------------------+------------------+------------------+\n",
      "|summary|      date|              hour|            minute|           pickups|\n",
      "+-------+----------+------------------+------------------+------------------+\n",
      "|  count|    128974|            128974|            128974|            128974|\n",
      "|   mean|      null|11.566509529052366|15.004419495402175| 29.00832725975778|\n",
      "| stddev|      null| 6.908556452594711|15.000057500526209|22.449669931429067|\n",
      "|    min|2009-01-01|                 0|                 0|               0.0|\n",
      "|    max|2016-06-30|                23|                30|             310.0|\n",
      "+-------+----------+------------------+------------------+------------------+\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# Анализ значений датафрейма \n",
    "# с предварительно заполненными пропусками\n",
    "taxi.fillna(0).describe().show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "76dedfc3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Количество объектов без пропусков до удаления пропусков\n",
      "\n",
      "До удаления пропусков   : 128969\n",
      "После удаления пропусков: 128974\n"
     ]
    }
   ],
   "source": [
    "# Расчет количества объектов без пропусков \n",
    "\n",
    "print('Количество объектов без пропусков до удаления пропусков')\n",
    "print('\\nДо удаления пропусков   :', taxi.dropna(how='any', subset='pickups').count()) \n",
    "\n",
    "# Заполнение пропусков нулями\n",
    "taxi = taxi.fillna(0)\n",
    "\n",
    "print('После удаления пропусков:', taxi.dropna(how='any', subset='pickups').count()) \n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "00be714a",
   "metadata": {},
   "source": [
    "### Данные в различных разрезах"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "ec45d80e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "+----------+----+------+-------+\n",
      "|      date|hour|minute|pickups|\n",
      "+----------+----+------+-------+\n",
      "|2015-11-01|   1|    30|  310.0|\n",
      "|2010-09-23|  22|    30|  288.0|\n",
      "|2012-03-07|  21|     0|  268.0|\n",
      "|2011-03-02|  20|    30|  264.0|\n",
      "|2011-03-02|  18|    30|  263.0|\n",
      "+----------+----+------+-------+\n",
      "only showing top 5 rows\n",
      "\n",
      "None\n"
     ]
    }
   ],
   "source": [
    "# Количество заказов такси по дням \n",
    "# от большего к меньшему\n",
    "result = spark.sql(\"\"\"\n",
    "SELECT   *\n",
    "FROM     taxi\n",
    "ORDER BY pickups DESC\n",
    "--LIMIT    5\n",
    ";\n",
    "\"\"\")\n",
    "\n",
    "print(result.show(5))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "bbed6660",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "+--------------------+\n",
      "|count(DISTINCT date)|\n",
      "+--------------------+\n",
      "|                  21|\n",
      "+--------------------+\n",
      "\n",
      "None\n"
     ]
    }
   ],
   "source": [
    "# Количество дат в которые было \n",
    "# более 200 заказов за 30 минут\n",
    "result = spark.sql(\"\"\"\n",
    "SELECT   COUNT(DISTINCT date)\n",
    "FROM     taxi\n",
    "WHERE    pickups > 200\n",
    ";\n",
    "\"\"\")\n",
    "\n",
    "print(result.show())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "1ff086d9",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "+---------------------------------+------------------+\n",
      "|extract('MONTH' FROM taxi.`date`)|      avg(pickups)|\n",
      "+---------------------------------+------------------+\n",
      "|                                3| 34.61413319776309|\n",
      "|                               10|31.492839171666343|\n",
      "|                                2|29.856671982987773|\n",
      "|                                5| 29.81593638978176|\n",
      "|                                4|29.313725490196077|\n",
      "|                                9|29.158446485623003|\n",
      "|                               11|28.860367558929283|\n",
      "|                                1|28.559511612021858|\n",
      "|                                6| 27.03835736129314|\n",
      "|                                7| 26.45983005021244|\n",
      "|                               12| 26.45916884626562|\n",
      "|                                8| 25.88592750533049|\n",
      "+---------------------------------+------------------+\n",
      "\n",
      "None\n"
     ]
    }
   ],
   "source": [
    "# Группировка записей по месяцам. Рассчет среднего количества заказов по каждому месяцу. \n",
    "# Печать на экране таблицы с месяцами и средним количеством заказов по убыванию.\n",
    "print(spark.sql(\"\"\"\n",
    "SELECT EXTRACT(MONTH FROM date), \n",
    "       AVG(pickups)\n",
    "FROM   taxi\n",
    "GROUP BY EXTRACT(MONTH FROM date)\n",
    "ORDER BY AVG(pickups) DESC;\n",
    "\"\"\").show())\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "5993e84c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "+----+------------------+\n",
      "|hour|      avg(pickups)|\n",
      "+----+------------------+\n",
      "|   8| 48.98208348725527|\n",
      "|   9| 45.74220335855324|\n",
      "|  18|45.131967515688444|\n",
      "|  19| 40.18456995201181|\n",
      "|  17| 37.68493909191584|\n",
      "|  12| 36.91678966789668|\n",
      "|  10|36.391031555637575|\n",
      "|  14|35.965867158671585|\n",
      "|   7| 35.94376618571957|\n",
      "|  13| 35.34939091915836|\n",
      "+----+------------------+\n",
      "only showing top 10 rows\n",
      "\n",
      "None\n"
     ]
    }
   ],
   "source": [
    "# Вычисление среднего количества заказов за каждый час. Сортировка данных по убыванию. \n",
    "# Вывод самых загруженных 10 часов и среднего количества заказов такси в эти часы.\n",
    "print(spark.sql(\"\"\"\n",
    "SELECT   hour,\n",
    "         AVG(pickups)\n",
    "FROM     taxi\n",
    "GROUP BY hour\n",
    "ORDER BY AVG(pickups) DESC\n",
    "\"\"\").show(10))\n"
   ]
  }
 ],
 "metadata": {
  "ExecuteTimeLog": [
   {
    "duration": 33199,
    "start_time": "2023-10-15T08:36:00.556Z"
   },
   {
    "duration": 202,
    "start_time": "2023-10-15T08:45:35.543Z"
   },
   {
    "duration": 1464,
    "start_time": "2023-10-15T08:45:35.906Z"
   },
   {
    "duration": 398,
    "start_time": "2023-10-15T08:45:37.372Z"
   },
   {
    "duration": 406,
    "start_time": "2023-10-15T08:50:00.281Z"
   },
   {
    "duration": 27386,
    "start_time": "2023-10-15T08:50:00.688Z"
   },
   {
    "duration": 1989,
    "start_time": "2023-10-15T08:50:28.076Z"
   },
   {
    "duration": 8189,
    "start_time": "2023-10-15T08:50:30.066Z"
   },
   {
    "duration": 4787,
    "start_time": "2023-10-15T08:50:38.258Z"
   },
   {
    "duration": 448,
    "start_time": "2023-10-15T09:20:15.774Z"
   },
   {
    "duration": 28717,
    "start_time": "2023-10-15T09:20:16.227Z"
   },
   {
    "duration": 1899,
    "start_time": "2023-10-15T09:20:44.946Z"
   },
   {
    "duration": 433,
    "start_time": "2023-10-15T09:20:46.846Z"
   },
   {
    "duration": 6519,
    "start_time": "2023-10-15T09:20:47.343Z"
   },
   {
    "duration": 6982,
    "start_time": "2023-10-15T09:20:53.863Z"
   },
   {
    "duration": 4413,
    "start_time": "2023-10-15T09:21:00.847Z"
   },
   {
    "duration": 2160,
    "start_time": "2023-10-15T09:28:12.432Z"
   },
   {
    "duration": 1655,
    "start_time": "2023-10-15T09:28:28.331Z"
   },
   {
    "duration": 786,
    "start_time": "2023-10-15T09:30:13.131Z"
   },
   {
    "duration": 431,
    "start_time": "2023-10-15T09:30:13.919Z"
   },
   {
    "duration": 214,
    "start_time": "2023-10-15T09:30:14.351Z"
   },
   {
    "duration": 425,
    "start_time": "2023-10-15T09:30:14.568Z"
   },
   {
    "duration": 1477,
    "start_time": "2023-10-15T09:30:14.995Z"
   },
   {
    "duration": 484,
    "start_time": "2023-10-15T09:30:23.562Z"
   },
   {
    "duration": 548,
    "start_time": "2023-10-15T09:33:39.600Z"
   },
   {
    "duration": 395,
    "start_time": "2023-10-15T09:33:40.152Z"
   },
   {
    "duration": 195,
    "start_time": "2023-10-15T09:33:40.549Z"
   },
   {
    "duration": 1311,
    "start_time": "2023-10-15T09:33:40.746Z"
   },
   {
    "duration": 1021,
    "start_time": "2023-10-15T09:33:42.059Z"
   },
   {
    "duration": 92,
    "start_time": "2023-10-15T09:37:44.140Z"
   },
   {
    "duration": 129,
    "start_time": "2023-10-15T09:37:54.232Z"
   },
   {
    "duration": 4651,
    "start_time": "2023-10-15T09:38:51.533Z"
   },
   {
    "duration": 3021,
    "start_time": "2023-10-15T09:39:12.563Z"
   },
   {
    "duration": 2230,
    "start_time": "2023-10-15T09:39:25.141Z"
   },
   {
    "duration": 2449,
    "start_time": "2023-10-15T09:39:57.935Z"
   },
   {
    "duration": 3018,
    "start_time": "2023-10-15T09:40:32.161Z"
   },
   {
    "duration": 2942,
    "start_time": "2023-10-15T09:43:36.953Z"
   },
   {
    "duration": 729,
    "start_time": "2023-10-15T09:43:39.897Z"
   },
   {
    "duration": 4063,
    "start_time": "2023-10-15T09:49:46.495Z"
   },
   {
    "duration": 114,
    "start_time": "2023-10-15T09:51:08.014Z"
   },
   {
    "duration": 3983,
    "start_time": "2023-10-15T09:51:21.973Z"
   },
   {
    "duration": 2676,
    "start_time": "2023-10-15T09:51:33.125Z"
   },
   {
    "duration": 3115,
    "start_time": "2023-10-15T09:52:56.836Z"
   },
   {
    "duration": 466,
    "start_time": "2023-10-15T10:00:16.768Z"
   },
   {
    "duration": 30138,
    "start_time": "2023-10-15T10:00:17.236Z"
   },
   {
    "duration": 1896,
    "start_time": "2023-10-15T10:00:47.376Z"
   },
   {
    "duration": 531,
    "start_time": "2023-10-15T10:00:49.345Z"
   },
   {
    "duration": 5189,
    "start_time": "2023-10-15T10:00:49.878Z"
   },
   {
    "duration": 3298,
    "start_time": "2023-10-15T10:00:55.069Z"
   },
   {
    "duration": 1476,
    "start_time": "2023-10-15T10:00:58.373Z"
   },
   {
    "duration": 5800,
    "start_time": "2023-10-15T10:00:59.851Z"
   },
   {
    "duration": 920,
    "start_time": "2023-10-15T10:01:05.653Z"
   },
   {
    "duration": 6889,
    "start_time": "2023-10-15T10:01:06.576Z"
   },
   {
    "duration": 5104,
    "start_time": "2023-10-15T10:01:13.466Z"
   },
   {
    "duration": 3270,
    "start_time": "2023-10-15T10:01:18.573Z"
   },
   {
    "duration": 3,
    "start_time": "2023-10-15T10:01:21.846Z"
   },
   {
    "duration": 1079,
    "start_time": "2023-10-15T10:02:27.477Z"
   },
   {
    "duration": 984,
    "start_time": "2023-10-15T10:02:40.677Z"
   },
   {
    "duration": 1024,
    "start_time": "2023-10-15T10:04:02.755Z"
   },
   {
    "duration": 847,
    "start_time": "2023-10-15T10:04:14.126Z"
   },
   {
    "duration": 987,
    "start_time": "2023-10-15T10:04:20.274Z"
   },
   {
    "duration": 436,
    "start_time": "2023-10-15T10:05:57.257Z"
   },
   {
    "duration": 27686,
    "start_time": "2023-10-15T10:05:57.696Z"
   },
   {
    "duration": 2027,
    "start_time": "2023-10-15T10:06:25.444Z"
   },
   {
    "duration": 490,
    "start_time": "2023-10-15T10:06:27.473Z"
   },
   {
    "duration": 4691,
    "start_time": "2023-10-15T10:06:27.966Z"
   },
   {
    "duration": 5595,
    "start_time": "2023-10-15T10:06:32.659Z"
   },
   {
    "duration": 2410,
    "start_time": "2023-10-15T10:06:38.256Z"
   },
   {
    "duration": 1586,
    "start_time": "2023-10-15T10:06:40.668Z"
   },
   {
    "duration": 1041,
    "start_time": "2023-10-15T10:06:42.258Z"
   },
   {
    "duration": 6313,
    "start_time": "2023-10-15T10:06:43.344Z"
   },
   {
    "duration": 4800,
    "start_time": "2023-10-15T10:06:49.660Z"
   },
   {
    "duration": 3393,
    "start_time": "2023-10-15T10:06:54.462Z"
   },
   {
    "duration": 112,
    "start_time": "2023-10-15T10:51:36.776Z"
   },
   {
    "duration": 9,
    "start_time": "2023-10-15T10:52:09.556Z"
   },
   {
    "duration": 8,
    "start_time": "2023-10-15T10:52:26.358Z"
   },
   {
    "duration": 10,
    "start_time": "2023-10-15T10:52:50.019Z"
   },
   {
    "duration": 8,
    "start_time": "2023-10-15T10:53:12.959Z"
   },
   {
    "duration": 8,
    "start_time": "2023-10-15T10:53:15.480Z"
   },
   {
    "duration": 451,
    "start_time": "2023-10-15T10:55:37.732Z"
   },
   {
    "duration": 24469,
    "start_time": "2023-10-15T10:55:38.185Z"
   },
   {
    "duration": 1618,
    "start_time": "2023-10-15T10:56:02.656Z"
   },
   {
    "duration": 493,
    "start_time": "2023-10-15T10:56:04.277Z"
   },
   {
    "duration": 3679,
    "start_time": "2023-10-15T10:56:04.772Z"
   },
   {
    "duration": 5002,
    "start_time": "2023-10-15T10:56:08.452Z"
   },
   {
    "duration": 2212,
    "start_time": "2023-10-15T10:56:13.456Z"
   },
   {
    "duration": 1178,
    "start_time": "2023-10-15T10:56:15.670Z"
   },
   {
    "duration": 909,
    "start_time": "2023-10-15T10:56:16.850Z"
   },
   {
    "duration": 4809,
    "start_time": "2023-10-15T10:56:17.762Z"
   },
   {
    "duration": 4100,
    "start_time": "2023-10-15T10:56:22.573Z"
   },
   {
    "duration": 2993,
    "start_time": "2023-10-15T10:56:26.675Z"
   }
  ],
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.5"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": true,
   "title_cell": "Содержание",
   "title_sidebar": "Contents",
   "toc_cell": true,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "263.594px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
